package com.zk.shop.util;

import org.springframework.core.io.ClassPathResource;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.io.File;

@Service
@Transactional
public class FileUtilImpl implements FileUtil{

    @Override
    public boolean isContainName(String fileName) {
        ClassPathResource resource = new ClassPathResource("templates/"+fileName+".html");
        if(resource.isFile()){
            return true;
        }else{
            return false;
        }
    }
}
